package com.example.lib_patrol

import com.example.lib_common.mvi.ResponseEntity
import com.example.lib_patrol.add.GroupEntity
import com.example.lib_patrol.add.PointEntity
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.POST

interface ApiService {
    @POST("sysPatrol/selALLPatroles")
    fun requestAllPatrol() : Flow<ResponseEntity<List<PatrolEntity>>>

    @POST("sysPatrol/selSysPoint")
    fun requestAllPatrolPoint() : Flow<ResponseEntity<List<PointEntity>>>

    @POST("sysPatrol/addPatrol")
    fun requestAddPatrols(@Body body: RequestBody) : Flow<ResponseEntity<PointEntity>>

    @POST("sysPatrol/selGroup")
    fun requestAllGroup() : Flow<ResponseEntity<List<GroupEntity>>>
}